Adaptive video data frame resampling

ABSTRACT

The arrangements and procedures of this invention adaptively process video data. Specifically, at least first and second fields of an interlaced frame are deinterlaced to form intermediate progressive first and second frames. The first intermediate progressive frame includes scanlines of a first temporal instant. The second intermediate progressive frame includes scanlines of a second temporal instant. The first and second temporal instants are different from one another. The first and second intermediate progressive frames are independently resampled to form respective first and second resampled frames. Scanlines from the first and second resampled frames are interleaved to generate a resampled interlaced frame.

RELATED APPLICATIONS

This patent application is a continuation-in-part of U.S. patent application Ser. No. 09/858,066, was filed on May 14, 2001 now U.S. Pat. No. 6,859,235, titled “Adaptively Deinterlacing Video on a per-Pixel Basis”, and Hereby incorporated by reference.

TECHNICAL FIELD

This invention relates to systems and methods for video coding.

BACKGROUND

Video information may be represented by progressive video or interlaced video. Modern computer monitors typically display progressive video. Conventional television monitors and older computer monitors typically display interlaced video. High definition television may display both interlaced and progressive video.

Progressive video includes a series of frames, where each frame is drawn as consecutive lines from top to bottom. In interlaced video, each frame is divided into a number of fields. Typically, the frame is divided into two fields, one field containing half of the lines (e.g., the even numbered lines), and the other field containing the other half of the lines (e.g., the odd numbered lines). The interlaced video, however, is still temporally ordered so that neighboring interlaced fields may represent video information sampled at different times.

There is often a need to convert interlaced video into progressive video and vice versa. For example, suppose a television broadcaster transmits a conventional television program as a series of interlaced fields. If these interlaced fields are to be displayed on a modern computer monitor (or on a high definition television display) that displays progressive frames, the interlaced fields must be converted into progressive frames.

The conversion involves using one or more fields of interlaced video to generate a frame of progressive video and repeating the process so that a stream of interlaced video is converted into a stream of progressive video. This conversion is often called “deinterlacing”. There are several conventional methods of deinterlacing.

One conventional deinterlacing method is called “scan line interpolation” in which the lines of a single interlaced field are duplicated to form a first half of the lines in the progressive frame. The second half of the lines in the progressive frame are formed by simply duplicating the same field again and inserting the field offset by one line into the second half of the lines to complete the progressive frame. This basic form of scan line interpolation is computationally straightforward and thus uses little, if any, processor resources. However, the vertical resolution of the progressive frame is only half of what the display is capable of displaying.

One variation on the scan line interpolation method is that the second half of the lines in the progressive frame are generated by interpolating (e.g., averaging) the neighboring lines in the interlaced field. This requires somewhat more computational resources, but results in a relatively smooth image. Still, the vertical resolution is only half of what the display is capable of displaying.

One deinterlacing method that improves vertical resolution over scan line interpolation is called “field line merging” in which lines from two consecutive fields are interweaved to form a progressive frame. However, the video information in the first field is not sampled at the exact same moment as the video information in the second field. If there is little movement in the image between the first and second fields, then field line merging tends to produce a quality image at relatively little processing costs. On the other hand, if there is movement between the first and second fields, simply combining fields will not result in a high fidelity progressive frame since half the lines in the frame represent the video data at a given time, and half the lines in the frame represent a significantly different state at a different time.

Higher processing methods use complex motion compensation algorithms to determine where in the image there is motion, and where there is not. For those areas where there is no motion, field line merging is used because of its improved vertical resolution. For those areas where there is motion, scan line interpolation is used since it eliminates the motion artifacts that would be caused by field line merging. Such motion compensation algorithms may be implemented by the motion estimation block of an MPEG encoder. However, such complex motion compensation methods require large amounts of processing and memory resources.

Therefore, methods and systems are needed for deinterlacing to provide a relatively high fidelity progressive frame without having to dedicate the processor and memory resources required by complex motion compensation algorithms.

Moreover, due to different display device hardware and software configurations, both progressive and interlaced Video data often needs to be resampled or resized to present quality images based on a particular device's display resolution configuration. For instance, a computer monitor typically displays a fixed area of pixels in resolutions such as 640×480 pixels-per-inch (ppi), 800×600 ppi, 1024×768 ppi, and so on, as determined by the current display settings of the computer monitor.

Conventional systems and techniques to resample progressive video data result in image data of generally acceptable viewing quality. However, due to temporal differences between two fields of an interlaced video frame, interlaced data resampling is not well understood.

For instance, NTSC interlaced video sequences contain frames with two fields that differ temporally by 1/60th of a second. This temporal difference prevents resampling the two fields jointly (i.e. on a frame basis). That is, jointly resampling two interlaced fields of a frame generates a temporally aliased image, wherein otherwise smooth curves and lines are jagged and typically not of high viewing quality. Additionally, if the fields are resampled individually and then interleaved to form a frame, spatial resolution is lost since each field contains only ½ of the frame resolution. Accordingly, conventional systems and techniques to resample interlaced video data frames are substantially limited.

The following described systems and methods address these and other limitations of traditional systems and procedures to deinterlace video data and/or resample interlaced video data.

SUMMARY

The principles of the present invention provide for the adaptive deinterlacing of interlaced video to generate a progressive frame on a per pixel basis. In a first implementation of the present invention, two consecutive fields of interlaced video are converted into a frame of progressive video. One of the fields is replicated to generate half the lines in the progressive frame. The pixels in the other half of the progressive frame are generated pixel-by-pixel.

Specifically, for a given output position of the pixel in the other half of the progressive frame, a correlation is estimated between the corresponding pixel in the non-replicated field and at least one vertically adjacent pixel of the replicated field, and optionally one or more vertically adjacent pixels in the non-replicated fields. In one example, a window of pixels one pixel wide by five pixels high is evaluated centering on the pixel in the non-replicated field that corresponds to the output pixel position.

A value is then assigned to the output pixel that corresponds to the output position, the value depending on the correlation. The deinterlacing in accordance with the present invention interpolates between scan line interpolation and field merging depending on the correlation. For example, if there is a high vertical correlation, then more of field merging is performed for that pixel since a high correlation suggests less likelihood of movement at that pixel position. If there is a low vertical correlation, then more of scan line interpolation is performed for that pixel since a low correlation suggests more likelihood of movement at that pixel position. If there is moderate correlation, a balance of scan line interpolation and field merging is performed. This process is repeated for each pixel in the other half of the progressive frame until the entire progressive frame is generated.

Thus, unlike pure scan line interpolation or pure field line merging, the deinterlacing in accordance with the present invention adaptively uses a portion of each method depending on how much motion is detected at the pixel. The mechanism for estimating motion in accordance with the present invention is not as sophisticated as the conventional complex motion compensation methods. However, the mechanism for estimating motion compensation in accordance with the present invention provides suitable motion estimation for many video applications. In addition, the deinterlacing algorithm in accordance with the present invention does not require the extensive processing and memory resources that the complex motion compensation methods require. Therefore, the deinterlacing of the present invention is ideally suited for video applications in which processing and memory resources are limited.

In a second implementation of the invention, three consecutive input fields of interlaced video are converted into two output fields of interlaced video. The second temporal input field is replicated to produce a first of the two output fields. The other field is generated on a per pixel basis.

Specifically, for a given output pixel corresponding to an output position of the second output field, at least one pixel of the second temporal input field that is vertically adjacent to the output position of the second output field is used to determine which of the first temporal input field and third temporal input field more closely correlates to the second temporal input field at the output position. In one specific case, the upper pixel of the second temporal field (the upper pixel being directly above the output position of the second output field) is accessed. In addition, the lower pixel of the second temporal field (the lower pixel being directly below the output position of the second output field) is accessed. The upper pixel and the lower pixel are then averaged. This averaged value is then used to compare to the value of the corresponding pixel in the first temporal input field and to the value of the corresponding pixel in the third temporal field.

Then, a value is assigned to the output pixel that is based on the correlation at the output position between the first temporal input field and the second temporal input field, and between the third temporal input field and the second temporal input field. In a specific example, the value leans toward the value of the pixel in whichever of the first temporal input field or third temporal input field is closer at the output position to the averaged value.

In one example, a blending factor is used to determine how much of the value of the pixel in the first temporal input field at the output position, and how much of the value of the pixel in the third temporal input field at the output position is weighed in assigning the value to the output pixel. If, for a given pixel, the averaged value is closer to the value of the pixel in the first temporal input field at the output position, then the value of the blending factor is altered in one direction. If, on the other hand, the averaged value is closer to the value of the pixel in the third temporal input field at the output position, then the value of the blending factor is altered in the opposite direction. The altered blending factor is carried forward for the analysis of other pixels. Thus, the blending factor changes as pixels in a given line are generated. The blending factor may be reset to a neutral value as each line begins.

The second implementation takes into consideration which of the first and third temporal input fields are closer to the second temporal input field when determining how much of the first temporal input field and how much of the third temporal input field should be used in generating the second temporal input field. Thus, if there is a big difference between the second and third temporal input fields, the first output field will be the second temporal input field while the second output field will tend more towards the first temporal input field. Likewise, if there is a big difference between the first and second temporal input fields, the first output field will be the second temporal input field while the second output field will tend more towards the third temporal input field. This is especially useful with performing inverse telecine.

In yet another implementation, the invention adaptively processes video data. Specifically, at least first and second fields of an interlaced frame are deinterlaced to form intermediate progressive first and second frames. The first intermediate progressive frame includes scanlines of a first temporal instant. The second intermediate progressive frame includes scanlines of a second temporal instant. The first and second temporal instants are different from one another. The first and second intermediate progressive frames are independently resampled to form respective first and second resampled frames. Scanlines from the first and second resampled frames are interleaved to generate a resampled interlaced frame. For instance, even lines from the first resampled frame and odd lines from the second resampled frame can be interleaved to generate a resampled interlaced output frame.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an exemplary system that provides a suitable operating environment for the present invention.

FIG. 2 schematically illustrates the conversion of two consecutive interlaced fields into a single progressive frame using a deinterlacing module in accordance with a first implementation of the present invention.

FIG. 3 illustrates a flowchart of a method for converting two consecutive interlaced fields into a single progressive frame in accordance with the first implementation of the present invention.

FIG. 4A illustrates a progressive frame with half of its values assigned by replicating one of the two consecutive interlaced fields.

FIG. 4B illustrates the progressive frame of FIG. 4A with a pixel location marked with an “X” to identify a subject pixel that is to be assigned a value.

FIG. 4C illustrates both of the two consecutive interlaced fields superimposed with a correlation window that identifies a column of five pixels that are to be analyzed for correlation.

FIG. 4D illustrates the progressive frame of FIG. 4B with the value of the subject pixel filled in.

FIG. 5 schematically illustrates the conversion of three consecutive interlaced fields into two interlaced fields using a conversion module in accordance with a second implementation of the present invention.

FIG. 6 illustrates a flowchart of a method for converting three consecutive interlaced fields into two interlaced fields in accordance with the second implementation of the present invention.

FIG. 7A illustrates one of the output fields with its values determined by replicating the second temporal input field and with a pixel position in the second output field marked by an “X” to identify a pixel that is to be assigned a value.

FIG. 7B illustrates the two output fields with the value of the pixel previously marked with an “X” filled in and with the next horizontal pixel in the line marked with an “X” to illustrate that that pixel is now to be assigned a value.

FIG. 8 shows an exemplary video data resampling module to adaptively resample both interlaced and progressive video data.

FIG. 9 shows an exemplary procedure to resample video data.

FIG. 10 shows further aspects of an exemplary procedure to adaptively resample video data. In particular, FIG. 10 further illustrates adaptive interlaced video data resampling operations.

FIG. 11 shows further aspects of an exemplary procedure to adaptively resample video data. In particular, FIG. 11 further illustrates generation of a high-quality resampled interlaced or progressive frame from resampled progressive-to-progressive data.

DETAILED DESCRIPTION

Overview

The present invention is directed to systems, procedures, and other arrangements to adaptively: (a) deinterlace interlaced video to generate a progressive frame on a per pixel basis; and (b) resample both progressive and interlaced video data.

In a first implementation, two consecutive fields of interlaced video are converted into a frame of progressive video. One of the fields is replicated to generate half the lines in the progressive frame. The pixels in the other half of the progressive frame are generated pixel-by-pixel. Specifically, for a given output position of the pixel in the other half of the progressive frame, a correlation is estimated between the corresponding pixel in the non-replicated field and at least one vertically adjacent pixel of the replicated field, and optionally one or more vertically adjacent pixels in the non-replicated fields. A value is then assigned to the output pixel that corresponds to the output position, the value depending on the correlation. If there is a high vertical correlation, then more field merging is performed for that pixel since a high correlation suggests less likelihood of movement at that pixel position. If there is a low vertical correlation, then more scan line interpolation is performed for that pixel since a low correlation suggests more likelihood of movement at that pixel position.

In another implementation, video data is adaptively resampled to provide resampled interlaced video data of substantially high visual quality with high spatial and temporal resolution. This is in contrast to conventional techniques to resample interlaced video data, which typically create undesired temporal aliasing and/or loss of spatial resolution in the resampled data.

The implementations of the present invention may comprise a special purpose or general-purpose processing device or computer including various computer hardware components, as discussed in greater detail below. The implementations may further comprise multiple computers linked in a networked environment. Set top boxes, gaming consoles, and the like, represent examples of a special purpose computer.

Implementations within the scope of the present invention also include computer-readable media for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise physical storage media such as RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code means in the form of computer-executable instructions or data structures and that can be accessed by a general purpose or special purpose computer.

When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination of hardwired or wireless) to a computer, the computer properly views the connection as a computer-readable medium. Thus, such a connection is also properly termed a computer-readable medium. Combinations of the above should also be included within the scope of computer-readable media. Computer-executable instructions comprise, for example, instructions and data which cause a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions.

The invention will be described in the general context of computer-executable instructions, such as program modules, being executed by gaming consoles or other computers. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The sequence of instructions implemented in a particular data structure or program module represents examples of corresponding acts for implementing the functions or steps described herein.

FIG. 1 and the corresponding discussion are intended to provide a general description of a suitable environment in which the invention may be implemented. In the discussion, reference is made to a home entertainment system that may be used for displaying and/or recording programming. For purposes of this description and in the claims, a “home entertainment system” may be a display unit, such as a television screen, coupled to a processing device for performing the data processing acts and steps disclosed herein, or may include any number of interconnected consumer electronic devices, with at least one of which having a processing device for performing the data processing disclosed herein.

Examples of such consumer electronic devices include a video cassette recorder (“VCR”), a video game system, a stereo system, a television or monitor with data processing capabilities, a cable television box, a digital satellite system receiver (“DSS”), a digital video broadcasting system (“DVB”), a digital versatile disc system (“DVD”), a compact disk read-only memory system (“CD-ROM”), a set-top box that serves as an Internet terminal, and any other device capable of processing data as described herein. Furthermore, the term “home entertainment system” is to be understood as a term that broadly describes a television-viewing environment, whether it is located in a viewer's home, at a place of business, in the public, or at any other location. Also for purposes of this description and in the claims, the term “programming” includes both the viewable and non-viewable portions of moving image data and its associated sound data, including for example, interlaced and/or progressive video data.

In one implementation, the present invention is implemented in a system that uses a conventional television screen or other display unit to display information and includes a gaming console, set-top box, or a similar Internet terminal that has been adapted to perform the operations that include composing, sending and receiving email, browsing the World Wide Web (“Web”), accessing other segments of the Internet, and otherwise displaying information. An Internet terminal may use standard telephone lines, Integrated Services Digital Network (ISDN) lines, cable lines associated with cable television service, or the like to connect to the Internet or other wide area networks.

An Exemplary Operating Environment

FIG. 1 illustrates a home entertainment system 110 that includes a management system 112, a display device 114 and an audio system 116. Management system 112 may be a gaming console, set-top box, or Internet terminal that has been adapted to perform the operations disclosed herein. Management system 112 may be integrally positioned with or separate from display device 114, which may be a high definition television display, a standard television display, a flat panel display, a projection device, an interface involving direct neural stimulation, a computer monitor, or any other device capable of displaying viewable video image data. Audio system 116 may be a speaker, a stereo system, or any device capable of emitting sound data, and similarly may be integrally positioned with or separate from display device 114.

Management system 112 includes a signal input 118, which receives programming from a signal source 120. The programming is transmitted from signal source 120 to signal input 118 via a programming input line 122, which can be a cable or fiber-optic connection, a terrestrial antenna system, a satellite system, or any device or system capable of transmitting programming to home management system 112.

The signal source 120 may be either a single channel signal source or a multiple channel signal source. A single channel signal source provides programming from a recorded medium, such as a videocassette, compact disc, etc. Examples of a single channel signal source include a VCR, a DVD, and the like. Alternatively, a multiple channel signal source includes any system or device that is capable of sending a signal that may be received by a satellite receiver, a cable or fiber-optic connection, a terrestrial antenna, or the like. Examples of a multiple channel signal source include DSS/DVB, a cable box, locally broadcast programming (i.e. programming broadcast using UHF or VHF), and the like.

While FIG. 1 illustrates home entertainment system 110 as having a single programming input line 122 and a single signal source 120, there may also be a plurality of programming input lines that transmit programming from a plurality of signal sources. In such implementations, the home entertainment system may receive the programming from one signal source or from a plurality of signal sources at a time.

Management system 112 also includes a user input interface 124, which receives input from an input device 126, such as a remote control, external special purpose or general-purpose processing device or computer, keyboard, microphone, mouse, or any other device capable of generating electronic instructions for management system 112. Input device 126 is communicatively coupled to management system 112 over an input link 128 so as to enable such control. Input device 126 generates electronic instructions over input link 128 in response to preprogrammed data or in response to a viewer pressing buttons on input device 126. Input device 126 may also control Web browser software within management system 112 as when management system 112 is a set-top box or an Internet terminal that has been adapted to perform the operations disclosed herein. For instance, input device 126 may be programmed to turn on home entertainment system 110 and to tune management system 112 to a channel.

FIG. 1 illustrates a signal recorder 130, which is capable of receiving video and/or audio data and recording the data on a storage medium. Video signals are transmitted to display device 114 and/or signal recorder 130 by video image links 132 a and 132 b respectively, examples of which include a radio-frequency (“RF”) link, an S-video link, a composite link, or any other equivalent form of video image link. Similarly, audio links 134 a and 134 b transmit audio data from management system 112 to audio system 116 and/or to signal recorder 130.

The operation of management system 112 is controlled by a central processing unit (“CPU”), illustrated as processing unit 136, which is coupled to an application-specific integrated circuit (“ASIC”) 138 via system bus 140 and uses computer-executable instructions implemented in software and/or hardwired logic circuitry. Processing unit 136 and ASIC 138 are also coupled via a system bus 140 to various other system components, including system memory 142, mass storage interface 144, user interface 124 and signal input 118. Processing unit 136 may execute software designed to implement features of management system 112 including features of the present invention. Alternatively or in addition, ASIC 138 may be used to implement the features of the present invention.

ASIC 138 contains circuitry that is used to implement certain functions of management system 112. Instructions, data, and other program modules necessary for the operation of processing unit 136 and necessary for the operation of the ASIC 138 may be stored in mass storage device 150 and/or system memory 142, which includes read-only memory (“ROM”) 146 and random-access memory (“RAM”) 148. System memory 142 is coupled to system bus 140 and mass storage device 150 is coupled to mass storage interface 144, which is in turn also coupled to system bus 140. Thus, ROM 146, RAM 148 and mass storage device 150 are communicatively coupled to ASIC 138 so as to be readable by ASIC 138 and so that data may be written from ASIC 138 to RAM 148 and to mass storage device 150. Mass storage device 150 may be a magnetic hard disk 152, but may also be any of the other computer-readable media referenced above.

Any desired computer-readable instructions or data such as application programs 154, other program modules 156, and data 158 can be stored in any combination of mass storage device 150 and/or system memory 142.

Application programs 154 include, for example, an operating system (not shown) to provide a runtime environment. A runtime environment facilitates extensibility of management device 110 by allowing interfaces to be defined that, in turn, allow hardware and software aspects of the management device to interact with one another. Program modules 408 further include, for example, a deinterlacing module to deinterlace interlaced video to generate a progressive frame on a per pixel basis, and a resampling module to adaptively resample both interlaced and progressive video data 153 and thereby produce resampled video data of substantially high viewing quality. An exemplary deinterlacing module is described in greater detail below in reference to FIG. 2. An exemplary adaptive resampling module is described in greater detail below in reference to FIGS. 8–11.

Other program modules 156 include, for example, a basic input/output system or BIOS, any number of device drivers to interface/control a device such as display device 114, and so on.

Data 158 includes, for example, hardware and software configuration data or settings (e.g., pixel display resolution(s) supported by display device 114, etc.), an electronic programming guide (“EPG”), which specifies the broadcast times and channels of programs can be stored in mass storage device 150, and additional data such as one or more progressive video frames produced from interlaced video frames, and resized/resampled video data (i.e., resampled video data 804, 806, 812, and/or 814 of FIG. 8) as described in greater detail below in reference to FIGS. 8–11.

Mass storage device 150 may also be used to record video data 153, in which case, management system 112 performs the functions of a digital video recorder. Digital video data may be received by home entertainment system 110 from a variety of sources including signal source 120, remote computer 160, video game 168, input device 126 and the Internet.

EPG data may be obtained in a variety of manners. For instance, the EPG data can be supplied to management system 112 by a remote computer 160, such as a server, or from devices on the Internet and stored on mass storage device 150. The EPG data may be supplied on a regular basis to continually maintain a current schedule of programming at the management system 112. Alternatively, the EPG may be delivered to home entertainment system 110 by using a direct-dial communication over standard telephone lines, or by using data transmission over the cable television infrastructure, a satellite network, an over-the-air broadcast or any other available medium, including those previously mentioned.

In the implementation where management system 112 is associated with the Internet, management system 112 may communicate with remote computer 160 via wide area network (“WAN”) 162 using a variety of techniques, including interposing serial port interface 164 between the system bus 140 and a modem 166, using a wireless link, or other means for establishing communications over a WAN that may be internal or external to management system 112. Management device 112 is also capable of transmitting information via the Internet by direct-dial communication over standard telephone lines, or by using any other available communication medium.

While serial port interface 164 may be utilized to connect a modem 166 for communicating across a WAN, serial port interface may also be utilized to connect other consumer electronic devices, such as video game 168, and/or various input devices, such as a keyboard (not shown) or joystick (not shown), to management device 112.

Referring now to signal input 118, if the signal on programming input line 122 includes multiple channels, a tuner 170 included in signal input 118 tunes to a selected channel in the signal. Multiple tuners 170 can be used to provide enhanced viewing features, such as picture-in-picture, recording one channel while viewing another, and recording a plurality of channels simultaneously. A signal decoder 172 may convert video data from an analog format to a digital format, from a digital format to an analog format, or convent between varying digital formats, in the event that ASIC 138 and tuner 170 employ different formats. Video decoder 172 may also decode video data from a compressed video format (e.g. MPEG). Alternatively or in addition, the ASIC 138 may be used to decode video. In implementations where the management system 112 includes multiple tuners 170, management system 112 may also include multiple signal decoders 172 to perform the operations disclosed herein.

Management system 112 may also include video output 174, which may include a video converter that switches between analog and digital formats as necessary when providing video data over video links 132 a and 132 b. Similarly, audio output 176 can include an audio converter to provide the necessary switching between analog and digital formats across audio links 134 a and 134 b.

While FIG. 1 and the corresponding discussion above provide a general description of a suitable environment in which the invention may be implemented, it will be appreciated that the features of the present invention disclosed herein may be practiced in association with a variety of different system configurations. The invention may be implemented in software, hardware or any combination thereof, whether now existing or to be developed in the future, that is able to implement the principles of the present invention. Examples of suitable operating environments that may be adapted to implement the principles of the present invention include general purpose computers, special purpose computers, set top boxes, gaming consoles or the like.

An Exemplary Deinterlacing Computer Program Module

FIG. 2 illustrates a deinterlacing module 203 that converts two temporal interlaced fields 201 and 202 into a progressive frame 204. The deinterlacing module 203 may be, for example, one of the application programs 154 and/or other program modules 156 which may be loaded into system memory 142 in preparation for execution by processing unit 136. Alternatively, or in addition, the deinterlacing module 203 may be hard-wired in the ASIC 138. In addition, the video data described herein may be received from any of the video sources described above with respect to FIG. 1 and may be stored in system memory 142.

A field of interlaced video includes half of the number of total lines in an image or frame. A sequence of fields arranged in display order alternate, field-by-field, between an even parity field and an odd parity field. Even parity fields are those fields that include only the even numbered lines in the image. Odd parity fields are those fields that include only the odd numbered lines in the image. For example, the interlaced field 201 is an even parity field since it includes only lines 0, 2, 4 and 6. The interlaced field 202 is an odd parity field since it includes only lines 1, 3, 5 and 7.

In the example of FIG. 2 and subsequent Figures, interlaced fields are shown as being relatively small for clarity. For example, the interlaced fields are illustrated as being composed of 4 lines of 8 pixels, while the progressive frames are illustrated as being composed of 8 lines of 8 pixels. However, a typical interlaced field and progressive frame will be many times larger than the example interlaced fields and progressive frames used in the Figures and in this description. The smaller example fields and frames are used herein for clarity in describing the key principles of the present invention. The present invention is not limited to any particular size of interlaced field or progressive frame.

In FIG. 2 and in subsequent Figures, pixel values are identified by the position of the corresponding pixel in the field or frame. For example, Pxy is used to identify a pixel value corresponding to the pixel that is in the x'th column of the y'th line. In FIG. 2, the progressive frame 204 initially contains no pixel values. The deinterlacing module 203 fills the progressive frame 204 with pixel values as is now described.

A pixel typically has several associated component values. For example, in the YCbCr color space, a pixel has a Y or “luma” component that specifies the luminance of the pixel. A pixel may also have Cb and Cr “chroma” components that together specify the color of the pixel. However, the deinterlacing method described herein might be implemented only on the luma component, although several alternatives are also described further below. Since the human eye is less sensitive to color variations than brightness variations, the chroma components for the progressive frame may be obtained by pure scan line interpolation. Again, several alternatives to using just the luma component are described further below.

FIG. 3 illustrates a flowchart of a method 300 of converting consecutive temporal fields of interlaced video (e.g., fields 201 and 202) into a progressive frame of video. Half of the progressive frame is generated by simply replicating either of the consecutive fields of interlaced video (act 301). FIG. 4A illustrates the state 204 a of the progressive frame 204 after the field 201 has been replicated into the progressive frame.

The method also includes a step for generating the other half of the progressive frame so that the value of each pixel is adaptively determined on a per pixel basis depending on the vertical correlation in the first and second temporal fields at the position of the pixel (step 302). This step may include, for example, corresponding act 303, corresponding act 304, and decision block 305.

The other half of the progressive frame is generated on a per pixel basis. FIG. 4B shows the state 204 b of the progressive frame 204 after one of the interlaced fields has been replicated. Suppose that the method is now to determine the value of the pixel corresponding to column 1, line 3 of the progressive frame. This location is marked with an “X” in FIG. 4B for clarity.

Using this output position as an example, the method then estimates a correlation between a pixel of the non-replicated temporal field and at least one vertically adjacent pixel of the replicated temporal field (act 303). In the example, the non-replicated temporal field is field 202. The pixel of the non-replicated temporal field is pixel P13 since this pixel corresponds to the output position marked with an “X”. In the example, the replicated field is field 201. The vertically adjacent pixels of the replicated temporal field include pixels P12 and P14.

For example, referring to FIG. 4C, fields 201 and 202 are shown superimposed. A vertical correlation window 402 conceptually covers the pixel of the non-replicated temporal field (e.g., pixel P13) as well as both vertically adjacent pixels of the replicated field (i.e., pixels P12 and P14). In addition, the vertical correlation window 402 in the example of FIG. 4D also includes other vertically aligned pixels from the non-replicated field 202 (e.g., pixels P11 and P15).

The correlation between each of the pixels in the vertical window is estimated. The correlation is based on whether vertically adjacent pixels (more specifically, the pixel values) are equal to, greater than, or less then an adjacent pixel. There are five pixels in the window, namely, in this example, pixels P11, P12, P13, P14 and P15. P11 is compared to P12; P12 is compared to P13; P13 is compared to P14; and P14 is compared to P15. For each of these four comparisons, is then determined which of the following three conditions applies:

Condition 1: The upper pixel is greater than the adjacent lower pixel by more than a given tolerance (condition 1 is represented by the symbol “>”);

Condition 2: The value of the upper pixel is within the given tolerance of the value of the vertically adjacent lower pixel (condition 2 is represented by the symbol “=”); and

Condition 3: The upper pixel is less than the adjacent lower pixel by more than the given tolerance (condition 3 is represented by the symbol “<”).

Since there are four total comparisons in a five pixel window, with three possible results for each comparison, there are 81 different comparison results. These 81 different possibilities are reduced to 16 by recognizing that adjacent pixels are greater than or less than vertically adjacent pixels.

In order to accomplish this reduction in comparison permutations, the three upper pixels (in this case, pixels P11, P12 and P13) are compared. The relative values of these three pixels will be represented by a series of two consecutive characters, each character may be “>”, “<”or “=”. The first character represents the comparison between the lower two pixels (in this case, pixels P12 and P13) in the three pixels. The second character represents the comparison between the upper two pixels (in this case, pixels P11 and P12) in the three pixels. For example, a “><” indicates that the middle pixel (in this case, pixel P12) in the three pixels is greater than the lowest pixel (in this case, pixel P13), and that the upper pixel (in this case, pixel P11) is less than the middle pixel (in this case, pixel P12).

There are nine different comparison outcomes for the upper three pixels in the pixel window since there are a total of two comparisons with three possible outcomes each. However, if the “=” outcome is eliminated, in other words, if the each comparison is forced to be either “>” or “<”, then there are only four different comparison outcomes. This reduction is accomplished in accordance with the following Table 1.

TABLE 1 Input Intermediate Output Comparisons Assignment Comparisons < > > alt < > > < < alt > < > >, > no alt > > > =, and = > > >, < no alt < < = <, and < = = = ≅ either < < or > >

Note that input comparison “==” is either converted to an output comparison of either “<<” or “>>” In this case, the output comparison is assigned to be the comparison that maximizes correlation (minimizes alpha) as defined by the correlation values of Table 2. More regarding this will be explained further below with respect to Table 2. In this manner, the nine possible input comparisons for the upper three pixels are reduced to four possible output comparisons where there are no “=” comparisons. This is repeated for the lower three pixels (in this case pixels P13, P14 and P15) in the window 402. Thus, there are a total of sixteen comparisons involving four comparisons with two possible relationships or “<” for each comparison. The sixteen possible comparisons are thus, “<<<<”, “<<<>”, “<<><”, “<<>>”, “<><<”, “<><>”, “<>><”, “<>>>”, “><<<”, “><<>”, “><><”, “><>>”, “>><<”, “>><>”, “>>><”, and “>>>>”.

Based on the four comparisons, the output position is then assigned a correlation value “alpha” that ranges from 0 to 1. Higher alpha values estimate less correlation with an alpha value of 1 estimating no correlation with the vertically surrounding pixels. Lower alpha values estimate more correlation with an alpha value of 0 estimating perfect correlation with the vertically surrounding pixels.

The four comparisons include two possible values “<” or “>” and are listed starting from the bottom to the top. For example, “><>>” indicates that the next to the bottom pixel P14 is greater than the bottom pixel P15, the middle pixel P13 is less than the next to the bottom pixel P14, the next to the top pixel P12 is greater than the middle pixel P13, and top pixel P11 is greater than the next to the top pixel P12. The middle pixel P13 is assigned a correlation value “alpha” based on its relationship with the other pixels in accordance with the following Table 2.

TABLE 2 Input Vertical Comparisons “Alpha” Value >>>>, <<<< 0 ><><, <><> 1 >>><, >><<, ><<<, <<<>, <<>>, <>>> ⅛ <>><, ><<>, >><>, ><>>, <><<, <<>< ¾

As mentioned above, if the input comparisons between pixels P11, P12 and P13 was “==” in Table 1. The output comparisons would be assigned either “>>” or “<<” depending on what would minimize alpha according to Table 2 given the output comparisons between pixels P13, P14 and P15. For example, suppose that the input comparisons for P11, P12 and P13 was “==”, but that the output comparisons for P13, P14 and P15 was “>>”.

The possible choices for the input vertical comparisons “>>??” (where “??” represents a place marker for the vertical comparisons between P11, P12, and P13) are “>><<” (alpha=⅛), “>><>” (alpha=¾), “>>><” (alpha=⅛), and “>>>>” (alpha=0). In order to minimize alpha (and maximize correlation), if the output comparisons from Table 1 between P13, P14, P15 were “>>”, then the output comparisons for P13, P14, P15 would be selected to be “>>” as well thus resulting in an alpha value of zero.

It turns out that in order to minimize alpha when the input comparisons are “==”, the output comparisons are either “>>” or “<<”. For example, if the input comparisons for pixels P11, P12, and P13 are “==” and the output comparisons for the pixels P13, P14, and P15 are either “>>” or “><”, then the output comparisons for pixels P11, P12, and P13 would be chosen to be “>>”. If the input comparisons for the pixels P11, P12, and P13 are “==” and the output comparisons for the pixels P13, P14 and P15 are either “<<” or “<>”, then the output comparisons for the pixels P11, P12, and P13 would be chosen to be “<<”. If the input comparisons for pixels P11, P12, and P13 are “==” and the input comparisons for pixels P13, P14, and P15 are also “==”, then the input vertical comparisons in Table 2 may be chosen to be either “>>>>” or “<<<<”.

The subject pixel that corresponds to the output position (i.e., corresponds to the position of pixel P13) in the progressive frame is then assigned a value corresponding to the following equation 1. p′(0)=alpha*0.5*(p(1)+p(−1))+(1-alpha)*p(0)  (1)

where,

-   -   p′(0) is the value of the subject pixel;     -   alpha is the correlation value derived from Table 2;     -   p(1) is the value of the vertically adjacent lower pixel from         the replicated field;     -   p(0) is the value of the pixel in the non-replicated field that         corresponds to the output position; and     -   p(−1) is the value of the vertically adjacent upper pixel from         the replicated field.

When the five pixels in the vertical window correlate perfectly (i.e., “alpha” equals zero), no motion corresponding to the subject pixel is suggested. Accordingly, equation 1 reduces to equation 2 as follows. p′(0)=p(0)  (2)

In other words, if there is perfect correlation, the pixel from the non-replicated field is assigned as the value of the subject pixel in the progressive frame. Thus, for that one pixel position, field merging is perform as the vertical correlation suggested no motion between the consecutive temporal interlaced field at that output position.

When the five pixels in the vertical window correlated poorly (i.e., “alpha” equals one), then motion is suggested between the consecutive fields at the output position. Accordingly, equation 1 reduces to the following equation 3. p′(0)=0.5*(p(1)+p(−1))  (3)

In this case, pure scan line interpolation is used for that pixel. In other words, the upper vertically adjacent pixel from the replicated field is averaged with the lower vertically adjacent pixel from the replicated field to generate the output pixel.

For alpha values between zero and one, equation 1 may be used to interpolate between the field merging of equation 2 and the scan line interpolation of equation 3.

As was noted above, in the YCbCr color space, a pixel has several component values including a “Y” or “luma” component that represents the brightness of the pixel, as well as several color or “chroma” component values Cb and Cr which, in combination, define the color of the pixel. If the Cb and Cr components were zero, a grayscale brightness could be set using just the Y component. In the YCbCr color space, the Cb and Cr components can be subsampled with respect to the Y component since the eye is less sensitive to chroma than luma. For instance, if an image is 640×480, the map of Y components would be 640×480, while the maps of Cb and Cr components could each be 640×480 (known as 4:4:4), 320×480 (4:2:2), or 320×240 (4:2:0). For the 4:2:0 and 4:2:2 formats, chroma would be interpolated before it is displayed.

In performing deinterlacing in accordance with the first implementation of the present invention described above, the deinterlacing method is performed just on the luma component. Hence, the term “pixel value” is often used above to describe the pixel's luma component. The Cb and Cr components can be produced by using other, less computationally intensive deinterlacing methods, such as performing scan-line interpolation from whichever field was used as the replicated field in producing the deinterlaced Y component. Field merging may also be used to produce the Cb and Cr components although field merging tends to produce more artifacts than scan-line interpolation when producing Cb and Cr components.

By performing adaptive deinterlacing only on the luma component of the pixel, the processing requirements of the deinterlacing method are lower that they would be if adaptive deinterlacing were to be performing on all pixel component values. In addition, performing scan-line interpolation on Cb and Cr does not generate very objectionable artifacts, since the eye is not as sensitive to these chroma component values. However, the present invention may also be used to perform adaptive deinterlacing on all of the pixel component values if desired by repeating the described methods for each of the Y, Cb and Cr component values.

Alternatively, the correlation values resulting from the correlation test on the Y component values may be used to adaptively interpolate between scan line interpolation and field merging for that pixel for the Cb and Cr components as well. In addition to the YCbCr color space, the method may also be performed in other color spaces (for example, the RGB color space) as well by either processing each component independently or by using one component's correlation test to adaptively interpolate between scan line interpolation and field merging for the other component values for that pixel.

In the first implementation of the present invention described above, two consecutive interlaced fields are converted into a single progressive frame. In the second implementation of the present invention which will now be described, three consecutive interlaced fields are converted into two interlaced fields. Those two output interlaced fields may then be provided as inputs to the first implementation of the present invention for conversion into a progressive frame if so desired.

Referring to FIG. 5, three consecutive interlaced fields 501, 502 and 503 are converted into two interlaced fields 505 and 506 using a conversion module 504. In this illustrated example of FIG. 5, the second temporal interlaced field 502 has an odd parity (i.e., it contains only odd numbered lines), while the first and third temporal interlaced fields 501 and 503 are even parity (i.e., they contain only even lines). Alternatively, the second temporal interlaced field 502 could have an even parity, while the first and third temporal fields 501 and 503 have an odd parity. Either way, the principles of the second implementation apply as described herein. The two output fields are of opposite parity with output field 505 having an odd parity while output field 506 has an even parity.

FIG. 6 illustrates a flowchart of a method 600 for converting three consecutive interlaced fields into two interlaced fields in accordance with the second implementation of the present invention. In accordance with the method, the second temporal input field is replicated to produce one output field (act 601) that has the same parity as the second temporal input field. Since the second temporal input field has an odd parity, the second temporal input field is replicated into the output field 505. This is represented by output field 505 a of FIG. 7A.

The method also includes a step for generating the second output field pixel-by-pixel considering similarities between temporal input fields (step 602). In the implementation illustrated in FIG. 6, this step includes corresponding act 603, corresponding act 604, and decision block 605.

The second output field is generated pixel-by-pixel. FIG. 7A illustrates the second output field 506 a with one of the pixel positions marked with an “X”. For this output position, the method uses at least one pixel of the second temporal input field that is vertically adjacent to the output position of the second output field to determine which of the first temporal input field and third temporal input field more closely correlates to the second temporal input field at the output position (act 603). Referring to FIG. 5, the second temporal input field 502 contains two pixels (pixel P03 and pixel P05) that are vertically adjacent to the output position marked with an “X” in the output field 506 a. Either one or both of these vertically adjacent pixels may then be used to determine which of the first or third temporal input fields more closely correlates to the second temporal input field at the output position.

In one example, both vertically adjacent pixels P03 and P05 are used. The values P03 and P05 are then interpolated, and then the interpolated value is used to estimate the correlation. In one example, the values P03 and P05 are averaged and the average value is used to estimate the correlation. The interpolated value is compared to the value of the pixel (e.g., pixel P04 in the example) in the first temporal input field that correlates to the output position (marked with an “X” in FIG. 7A), and is compared to the value of the pixel (e.g., pixel p04 in the example) in the third temporal input field that correlates to the output position.

Once the correlation is determined, a value is assigned to the pixel corresponding to the output position (act 604), the value depending upon the correlation. Specifically, the value of the pixel at the output position tends towards the value of P04 if the first temporal input field more closely correlates to the second temporal input field at the output position. Also, the value of the pixel at the output positions tends towards the value of p04 if the third temporal input field more closely correlates to the second input field at the output position.

In one example, a blending factor is used to appropriately value the pixel at the output position. This blending factor may be an integer value between 0 and 16 inclusive, but excluding 8 so that the value may be represented by four bits. A lower blending factor means more of the corresponding pixel value of the first temporal input field is used to assign the value to the output pixel in the second output field. A higher blending factor means more of the corresponding pixel value of the third temporal input field is used to assign the value to the output pixel in the second output field.

At the beginning of each line, the value is set to a relatively neutral value of, for example, 7 or 9. Then, a change in the blending factor is determined based on the correlation of the averaged value of the vertically adjacent pixels in the second temporal input field with the corresponding pixels in the first and third temporal input fields. If the averaged value correlates better to the corresponding pixel in the first temporal input field, then the blending factor is decreased. If the averaged value correlated better to the corresponding pixel in the third temporal input field, then the blending factor is increased. The pixel value is then assigned based on the current value of the blending factor. For example, in FIG. 7B, the value P′04 is assigned to the output position.

If there are more pixels in the second output field to be generated (YES in decision block 605), then act 603 and 604 are repeated for the next pixel (e.g., the pixel marked with an “X” in FIG. 7B) with the new blending factor carried forward. Specifically, in act 603, the pixel values P13 and P15 may be averaged. The averaged value is then compared to pixel values P14 and p14 to determine how much the new carried forward blending factor should change, if at all. The process is repeated for each pixel until all the pixels in the second output field have been generated (NO in decision block 605).

In this second implementation, the pixel values that are subject to the above method may be the luma components of the pixel only. Alternatively, the above process may be repeated for each pixel component. In addition, the blending factor determined for one of the pixel components (e.g., the luma component) may be used in determining how to assign the other components (e.g., the chroma components) for the pixel.

One key advantage of the second implementation of the present invention is that generation of the second output field takes into consideration which of the first and third temporal input fields more closely matches the second temporal input field. Thus, if there is a major change (e.g., a cut) between the second and third temporal input fields, the output fields will correspond closely to the first and second temporal input fields. On the other hand, if there is a major change between the first and second temporal input fields, the output field will correspond closely to the second and third temporal input fields. Thus, the two output fields will tend to have fewer differences and thus will lend themselves better to conversion into a single progressive frame. One application in which a major change may occur between successive interlaced fields is when one performs inverse telecine conversion. Thus, the second implementation of the present invention is useful in performing inverse telecine.

Adaptive Resampling of Progressive and Interlaced Video Data

FIG. 1 is also an example of a suitable computing environment 110 on which an exemplary system and procedure to adaptively resample video may be implemented. As mentioned above, management device 112 is operational as any of a number of different consumer electronics devices. Examples of such consumer electronic devices include a personal computer, an image server computer, a thin client, a hand-held or laptop device, a video cassette recorder (“VCR”), a video game system, a stereo system, a television or monitor with data processing capabilities, a cable television box, a digital satellite system receiver (“DSS”), a digital video broadcasting system (“DVB”), a digital versatile disc system (“DVD”), a compact disk read-only memory system (“CD-ROM”), a set-top box that serves as an Internet terminal, and any other device capable of processing data as described herein.

FIG. 8 shows an exemplary video data resampling module 802 to adaptively resample both interlaced and progressive video data 153 (see, also FIG. 1). Video data 153 described herein may be received from any of the video sources described above with respect to FIG. 1 and may be stored in system memory 142 and/or mass storage device(s) 150. The resampling module 802 may be, for example, one of the application programs 154 of FIG. 1 and/or other program modules 156 which may be loaded into system memory 142 in preparation for execution by processing unit 136. Alternatively, or in addition, the image processing module 802 may be hard-wired in the ASIC 138.

The display device onto which resampled interlaced video data 812 is to be displayed is represented by display device 114 of FIG. 1. For instance, the display device may be a high definition television display, a standard television display, a flat panel display, a projection device, an interface involving direct neural stimulation, a computer monitor, or any other device capable of displaying video image data for viewing.

The resampling operations of the resampling module 802 are adaptive because they adjust data resampling resolution based on resolution setting(s) of a display device on which resampled video data may be displayed. The operations of the resampling module 802 are also adaptive because particular resampling operations that are directed to resampling interlaced data are not directed to progressive data. For instance, received video data 153 that is progressive is resampled to a current resolution setting of a display device on which the resampled data may be displayed. Such progressive data resampling is performed according to any of a number of known resampling algorithms to generate resampled progressive—progressive video data 804. However, as described in greater detail below, the progressive—progressive video data 804 can be converted to resampled progressive-to-interlaced video data 806, as determined by desired output (e.g., as indicated by display device characteristics such as a computer monitor displays progressive images and so on).

Whereas with respect to resampling interlaced data 153, the resampling module 802 resamples each interlaced frame by (a) deinterlacing two or three fields of each interlaced frame (i.e., based on operations described above with respect to FIGS. 1–7B) to generate a pair of intermediate progressive frames 808, wherein each intermediate frame represents a different temporal instant of the original interlaced frame; (b) resampling each intermediate frame based on a determined display resolution 810 of a display device onto which the resampled data may be displayed; and (c) outputs either resampled interlaced-to-interlaced data 812 or resampled interlaced-to-progressive data 814).

Resampled progressive—progressive video data 804 or resampled progressive-to-interlaced video data 806, intermediate progressive frames 808, display resolution settings 810, resampled interlaced-to-interlaced data 812, and resampled interlaced-to-progressive data 814, are stored in any combination of system memory 142 of FIG. 1 and/or mass storage device(s) 150 as data 158.

In contrast to interlaced video data that has been resampled with conventional resampling systems and techniques, which typically generate undesirable temporal aliasing and/or loss of spatial resolution in the resampled data, resampled interlaced-to-interlaced data 812 and resampled interlaced-to-progressive data 814 has substantially high spatial and temporal resolution. Additionally, resampled data 812 and 814 is of substantially high visual quality. These and other aspects of the video data resampling module 802 are now described (exemplary procedures of the resampling module 802 are also described below in reference to FIGS. 9–11).

Determining the Resolution Setting of a Target Display Device

To resample video data 153 to a current resolution setting of a display device on which the resampled data may be displayed, the resampling module 802 identifies a current pixel display resolution setting 810 (e.g., 640×480, 800×600, 1024×768, and/or so on) of a display device onto which resampled video data 804, 806, 812, or 814 is to be presented. To accomplish this, the resampling module 802 interfaces with a display driver that controls the display device. The display driver is stored in system memory 142 of FIG. 1 and/or storage device 150 as a program module 156. Every device (e.g., a display device, printer, storage device, keyboard, mouse, etc.) has a corresponding device driver program module 158. Many drivers, such as the device driver for the display device either come with an operating system (e.g., the graphics device interface (GDI)) or is loaded during a device's corresponding installation in management system 112 from diskette, CD-ROM, Web site, or the like.

Determining if the Video Data is Interlaced or Progressive

The resampling module 802 evaluates one or more parameters of video data 153 to determine the type of video data (i.e., progressive, interlaced, or a combination of both) that is being received. In one implementation, video data 153 is formatted according to MPEG standards and such parameters include “progressive-sequence”, “repeat-field”, and “progressive-frame” parameters. The progressive-sequence parameter indicates whether a certain number of subsequent frames are progressive or interlaced. For instance, when set (e.g., equal to one (1)), the progressive-sequence parameter indicates that a certain number of subsequent frames will be progressive. When not set (e.g., equal to zero (0)), the progressive-sequence parameter indicates that a certain number of subsequent frames will be interlaced. The number of frames that will be of one or the other type is indicated via the “repeat field” parameter.

The “progressive-frame” parameter (as opposed to the “progressive sequence” parameter), when set, indicates that the two fields of the current frame have high correlation and might represent the same temporal instance.

Video data 153 may include additional parameters that are used by the resampling module 802 to resample video data 153 to a substantially optimal resolution for presentation on a display device. For instance, MPEG video data also includes information on the nature of the video content as signaled by the “progressive sequence”, “progressive frame” and “repeat field” flags.

For example, when set, the “progressive frame” flag conveys temporal correlation between the two fields of the frame, whereby simplifying the resampling process by allowing progressive resampling of an otherwise interlaced sequence. Similarly, the “repeat field” flag, when set, signifies equivalence between 3-field and 2-field deinterlacing, thereby reducing the total amount of processing required to obtain optimal resampling. Furthermore, the “repeat field” flag, when set, often represents a 3:2 pull-down scenario, where the underlying video material is progressive. Such clues (the “repeat field”, “progressive sequence” and “progressive frame” flags) can be used to decide between sharp and smooth filters. Often “smooth” filters need to be applied to “intermediate frames” (arrived at via deinterlacing truly interlaced frames) in order to obviate noticeable temporal aliasing along with other artifacts such as flicker by effectively blurring the output. However, sharp filters can be applied to progressive frames or quasi-progressive frames (as deduced by way of the aforementioned parameters) without the detrimental artifacts. This adaptive selection of filters leads to better output visual quality.

For purposes of discussion, we first describe adaptive resampling of interlaced video data 153 before techniques to resample progressive video data 153.

Adaptively Deinterlacing Interlaced Video Data

If the resampling module 802 determines that a current portion of the video data 153 is interlaced, the interlaced video frame is then deinterlaced by deinterlacing module 203 of FIG. 2 to generate an intermediate progressive frame pair 808. As discussed above in reference to FIGS. 3 and 5, multiple deinterlacing schemes are available to selectively deinterlace two or more (e.g., three) fields of an interlaced frame into a pair of progressive frames 808 for subsequent resampling by the resampling module 802. Each intermediate frame 808 represents a particular different temporal instant as compared to the other intermediate frame 808 (the temporal instants are indicated by two or more fields of the interlaced frame).

In one implementation, wherein 3-field deinterlacing is being performed, the deinterlacing module 203 determines whether to deinterlace the current interlaced frame 153 with respect to the third field based at least in part on certain criteria. Such criteria include, for example, a determination of whether the interlaced frame includes motion compensation information, the relative availability of processing resources at that time to perform the deinterlacing, target image quality, a resize factor, resolution characteristics of target display device, scene changes within the video data 153, and so on.

Motion compensation information is available from the interlaced frame 153. In one implementation, if the interlaced frame includes motion information, 3-field deinterlacing is used to deinterlace the interlaced frame 153 to generate the intermediate progressive frame pair 808. If the interlaced frame does not include motion information, 2-field deinterlacing is used to deinterlace the interlaced frame 153 to generate the intermediate progressive frame pair 808.

Relative availability of processing resources of the management system 112 of FIG. 1 at that time to perform the deinterlacing operation is available via calls to the operating system represented by application programs 154. 3-field interlacing typically requires more processing and data storage resources than 2-field deinterlacing. For instance, if system 112 of FIG. 1 is a low resource environment with limited processing and/or data storage resources and/or the “repeat field” flag is set, 2-field deinterlacing may be desired.

Target image quality is generally a function of the particular application that is going to display the resampled data and/or end-user preferences. 3-field deinterlacing provides greater image quality than 2-field deinterlacing. This is also a factor if the video data 153 needs to be substantially enlarged to meet the display resolution setting 810, or target resolution. In such a situation, 3-field interlacing typically provides better results than 2-field deinterlacing. However, if the target resolution is relatively smaller than the resolution of the video data, then 2-field interlacing may be all that is required.

In another implementation, the deinterlacing module adapts its particular deinterlacing algorithm from 3-field deinterlacing to 2-field deinterlacing or vice versa only when a currently processed interlaced frame corresponding to a scene change. This is because converting from 3-to-2 field deinterlacing and vice versa may cause visual artifacts to be perceived in a stream of displayed resampled video data (i.e., any combination of resampled data 804, 806, 812, and 814). Since a scene change typically introduces some amount of orthogonal visual aspects into such a displayed stream, adapting the deinterlacing algorithm at this time is likely to be less noticeable. An interlaced frame that represents a scene change is typically identified by determining that there are substantially non-visually correlated components between at least two of the three fields in the interlaced frame. For instance, two of the fields may have substantially more visual content similarity with respect to one another as compared to the third fields. Additionally, if the video data 153 is based on an MPEG standard, the video data identifies locations of scene changes.

In another implementation, the deinterlacing module 203, responsive to determining that visual content corresponding to a set of the received video data 153 does not change more that some threshold amount across the set, adapts deinterlacing from 2-field deinterlacing to 3-field deinterlacing. Motion vectors between video data frames typically require substantially more processing to display the video data. However, in this example, since there is a relatively small amount of motion information in the evaluated set of video data, the more processing intensive 3-field deinterlacing can be applied to produce higher quality images without unnecessarily utilizing processing resources to resolve any motion compensation data.

Moreover, responsive to determining that visual content corresponding to a set of the received video data 153 does change more than some threshold amount across the set, meaning that the video data includes a relatively large amount of motion vector data, the deinterlacing module 203 adapts deinterlacing from more process intensive 3-field deinterlacing to less processing intensive 2-field deinterlacing.

The threshold amount of motion information required to trigger adapting from one deinterlacing mode to another can be determined on a number of different criteria such as by the nature of the video data (e.g., race car events as compared to golfing events), processing and/or storage resource availability, and so on.

Resampling and Filtering the Two Intermediate Frames

The resampling module 802 resamples each of the two deinterlaced frames 808 based on the determined display resolution setting 810. The resampling module 802 then determines whether an interlaced or a progressive resampled frame is to be output. This determination is made based on a number of criteria. In one implementation, such a determination is based on characteristics of the target display device on which the resampled output may be displayed. For instance, if resampled data is to be displayed on the device that displays progressive frames such as a computer monitor or a high-definition television, then progressive frame output is desired. In another example, if resampled data is to be displayed on a device that displays interlaced data such as a standard definition television set, then resampled interlaced data is typically desired. Such device characteristics generally can be determined by interfacing with the device driver that controls the display device. If the display device does not have such a device driver, the resampled data can be set to a default interlaced or progressive data type.

If interlaced resampled output is desired (i.e., interlaced-to-interlaced data 812), the resampling module 802 interleaves scan lines of the intermediate frames 808 to generate a resampled interlaced-to-interlaced frame 812. Since each intermediate frame 808 represents a different temporal instant as compared to the other intermediate frame 808, the scan lines can be interleaved to generate two distinct temporal instant fields of the resampled interlaced-to-interlaced frame 812.

The resampling module 802 then applies a smoothing filter such as a Gaussian filter to the temporal fields to mitigate flickering (due to the presence of high frequency visual components across fields) in the resampled interlaced-to-interlaced frame 812. The smooth filter averages spatial and temporal information in the temporal fields to remove any ghosting artifacts caused by the resampling operation. For instance, if the resolution of original video data 153 was low as compared to corresponding resolution of the resampled interlaced-to-interlaced data 812, the original image information in the video data was, to some degree, extrapolated. Such extrapolation can generate imaging artifacts, which are substantially removed by a smooth or blurring filter. A sharp filter is not used to filter interlaced-to-interlaced data 812 because such a filter may introduce flickering aspects.

If progressive resampled output is desired (i.e., interlaced-to-progressive data 814), the resampling module 802 selects a frame of the intermediate frame pair 808 to represent the resized interlaced-to-progressive frame 814. In one implementation, such a selection is based on characteristics of the target display device on which the resampled output may be displayed. For instance, if resampled data is to be displayed on the device that displays progressive frames such as a computer monitor or a high-definition television, then progressive frame output is desired. Such device characteristics can generally be determined by interfacing with the device driver that controls the display device.

At this point, the resampling module 802 applies a sharp filter to the generated interleaved-to-progressive frame 814 to remove any ghosting artifacts that may have been caused by the resampling operation. Since the interleaved-to-progressive frame 814 does not include information from different temporal fields, the sharpening filter can be applied without an endemic flicker problem (i.e., as in the case of the resampled interlaced frame 812).

Resampling Progressive Video Data 153

If the resampling module 802 determines that a current portion of the video data 153 is progressive, the current portion/frame is resampled (e.g., according to any one of a number of conventional resampling techniques based on display resolution setting 810. The resampling module 802 then determines whether an interlaced or a progressive resampled frame is to be output. This determination is made based on a number of criteria such as those criteria described above with respect to resampling interlaced video data 153. If the resampled progressive data 804 is to be output as interlaced data 806, the resampling module 802 converts the resampled progressive data 804 to resampled progressive-to-interlaced data 806. This progressive to interlaced data conversion can be accomplished in any one of a number of known manners.

The resampling module 802 then applies a smoothing filter such as a Gaussian filter to the temporal fields of the resampled progressive-to-interlaced frame 806 to mitigate flickering (i.e., due to presence of high frequency visual components across temporal fields). As discussed above, such a smoothing filter averages spatial and temporal information in the temporal fields to remove any ghosting artifacts caused by the resampling operation.

If progressive resampled output is desired, the resampling module 802 applies a sharp filter to the resampled progressive-to-progressive frame 804 to remove any ghosting artifacts that may have been caused by the resampling operation. Since the resampled progressive-to-progressive frame 804 does not include information from different temporal fields, there is no issue of temporal aliasing, and furthermore the sharpening filter may be applied to remove ghosting artifacts while maintaining visual quality.

An Exemplary Adaptive Resampling Procedure

FIG. 9 shows an exemplary procedure 900 to deinterlace and resample video data. For purposes of discussion, this procedure 900 is discussed referring to different features of FIGS. 1, 2, 8, 10, and 11.

At block 902, video data resampling module 802 of FIG. 8 determines resolution settings of the display device (e.g., a display device 114 FIG. 1). At block 904, the resampling module 802 evaluates received video data 153 to determine whether the video data is progressive, interlaced, or a combination of both. At block 906, if a current frame of the video data 153 is interlaced, the procedure continues at block 908. At block 908, the interlaced in module 203 of FIG. 2 deinterlaces the interlaced frame to form two intermediate progressive frames (i.e., intermediate progressive frames 808 of FIG. 8). At block 910, the resampling module 802 resamples each intermediate progressive frame according to the determined resolution setting of the display device (i.e., resolution setting 810 of FIG. 8) that may present video data resampled according to the aspects of this procedure (i.e., resampled data 804, 806, 812, or 814). The procedure 900 continues at block 1002 of FIG. 10.

FIG. 10 shows further aspects of an exemplary procedure 900 to adaptively resample video data. In particular, FIG. 10 further illustrates adaptive interlaced video data (i.e., video data 153 of FIG. 1) resampling operations. At block 1002, the video data resampling module 802 determines a substantially optimal video data type to output (i.e., interlaced or progressive such as resampled data 804, 806, 812, or 814 of FIG. 8). At block 1004, it having been determined that resampled interlaced video output is desired, the resampling module 802 interleaves scan lines of the intermediate frames 808 of FIG. 8 to generate a resampled interlaced-to-interlaced frame 812. At block 1006, the resampling module 802 applies a smoothing filter to the resampled interlaced-to-interlaced frame 814 to reduce any undesired visual artifacts generated by the resampling operation.

Referring to FIG. 9 and block 906, if received video data (i.e., video data 153 of FIG. 1) is determined to be progressive data, the procedure 900 continues at block 910, wherein the progressive video frame is resampled to generate resampled progressive-to-progressive frame 804. The procedure 900 continues at FIG. 11 and block 1102.

FIG. 11 shows further aspects of an exemplary procedure 900 to adaptively resample video data. In particular, FIG. 11 further illustrates generation of a high-quality resampled interlaced or progressive frame from resampled progressive-to-progressive data 804 of FIG. 8. At block 1102, the resampling module 802 determines whether a resampled interlaced frame (in contrast to the resampled progressive-to-progressive frame 804) is desired. If so, the procedure 900 continues at block 1104, wherein the resampled progressive frame is converted to a resampled interlaced frame (i.e. resampled progressive-to-interlaced frame 806). At block 1106, the resampling module applies a smoothing filter to the resampled progressive-to-interlaced frame to reduce any undesired visual artifacts generated by the resampling operation.

At block 1100, if desired output is a progressive frame, the procedure continues at block 1108, wherein a sharp filter is applied to the progressive-to-progressive frame 804 to reduce any undesired visual artifacts generated by the resampling operation.

CONCLUSION

The described arrangements and procedures provide for adaptively deinterlacing and resampling video data. Although the arrangements and systems to adaptively deinterlace and resample video data have been described in language specific to structural features and methodological operations, it is to be understood that the arrangements and procedures as defined in the appended claims are not necessarily limited to the specific features or operations described. Rather, the specific features and operations are disclosed as preferred forms of implementing the claimed subject matter. 

1. A computer-based method to adaptively process video data, the method comprising: deinterlacing at least a first and a second field of an interlaced frame to form first and second frames, the first frame comprising scanlines of a first temporal instant, the second frame comprising scanlines of a second temporal instant that is different from the first temporal instant; independently resampling the first and second frames to form respective first and second resampled frames; interleaving scanlines from the first and second resampled frames to generate a resampled interlaced frame comprising at least first and second resampled fields; wherein the interlaced frame further comprises a third field from a third temporal instant that is different from at least the first and/or second temporal instants, and wherein deinterlacing further comprises: if the interlaced frame includes motion information, deinterlacing the interlaced frame using the first, second, and third fields to generate the first and second frame; and if the interlaced frame does not include motion information, deinterlacing the interlaced frame using the first and second fields to generate the first and second frame.
 2. A computer-based method to adaptively process video data, the method comprising: deinterlacing at least a first and a second field of an interlaced frame to form first and second frames, the first frame comprising scanlines of a first temporal instant, the second frame comprising scanlines of a second temporal instant that is different from the first temporal instant; independently resampling the first and second frames to form respective first and second resampled frames; interleaving scanlines from the first and second resampled frames to generate a resampled interlaced frame comprising at least first and second resampled fields; if a top and a bottom field of the resampled interlaced frame are from a same temporal instance, filtering the resampled interlaced frame with a sharp filter, and if a top and a bottom field of the resampled interlaced frame represent different respective temporal instances, filtering the resampled interlaced frame with a smooth filter.
 3. A computer-based method to adaptively process video data, the method comprising: determining whether a frame of received video data is interlaced or progressive; if the frame is an interlaced frame, generating a resampled interlaced frame as follows: deinterlacing at least a first and a second field of the interlaced frame to form first and second frames, the first frame comprising scanlines of a first temporal instant, the second frame comprising scanlines of a second temporal instant that is different from the first temporal instant; independently resampling the first and second frames to form respective first and second resampled frames; interleaving scanlines from the first and second resampled frames to generate the resampled interlaced frame comprising at least first and second resampled fields; and if the frame is a progressive frame, resampling the frame to generate a resampled progressive frame.
 4. A method as recited in claim 3, wherein before deinterlacing, resampling, and interleaving, the method further comprises: determining a substantially optimal frame output format based on characteristics of a target display device; if the frame is interlaced and the substantially optimal frame output format is interlaced, filtering the resampled frame with a smooth filter; if the frame is interlaced and the substantially optimal frame output format is progressive: (a) converting the resampled interlaced frame to a progressive frame; and (b) filtering the progressive frame with a sharp filter; if the frame is progressive and the substantially optimal frame output format is interlaced: (c) converting the resampled progressive frame to an interlaced frame; and (d) filtering the interlaced frame with a smooth filter; if the frame is progressive and the substantially optimal frame output format is progressive, filtering the resampled progressive frame with a sharp filter.
 5. A computer-based method to adaptively process video data, the method comprising: deinterlacing at least a first and a second field of an interlaced frame to form first and second frames, the first frame comprising scanlines of a first temporal instant, the second frame comprising scanlines of a second temporal instant that is different from the first temporal instant; independently resampling the first and second frames to form respective first and second resampled frames; interleaving scanlines from the first and second resampled frames to generate a resampled interlaced frame comprising at least first and second resampled fields; and wherein deinterlacing further comprises adapting deinterlacing from 3-field deinterlacing to 2-field deinterlacing, the interlaced frame corresponding to a scene change, the scene change being identified by substantially non-visually correlated components between at least two of the first, second, and third fields.
 6. A computer-based method to adaptively process video data the method comprising: deinterlacing at least a first and a second field of an interlaced frame to form first and second frames, the first frame comprising scanlines of a first temporal instant, the second frame comprising scanlines of a second temporal instant that is different from the first temporal instant; responsive to determining that visual content corresponding to a set of the received video data does not change a threshold amount across the set, adapting deinterlacing from 2-field deinterlacing to 3-field deinterlacing; and/or responsive to calculating that the set changes more than the threshold amount with respect to visual content, adapting deinterlacing from 3-field deinterlacing to 2-field deinterlacing; independently resampling the first and second frames to form respective first and second resampled frames; interleaving scanlines from the first and second resampled frames to generate a resampled interlaced frame comprising at least first and second resampled fields.
 7. A method as recited in claim 6, wherein adapting deinterlacing is performed at a scene change identified by substantially non-visually correlated components between at least two fields of three fields of the interlaced frame.
 8. A computer-readable medium comprising computer-program instructions executable by a processor to adaptively process video data, the computer-program instructions comprising instructions for: selecting a particular deinterlacing criterion based on whether portions of video data in proximity to the interlaced frame include a threshold amount of motion compensation information, the particular deinterlacing criterion being selected from a first and a second deinterlacing criterion, selecting the particular deinterlacing criterion is being performed at a scene change identified by substantially non-visually correlated components between at least two fields of three fields of the interlaced frame; and deinterlacing the interlaced frame based on the particular deinterlacing criterion to generate at least one progressive frame.
 9. A computer-readable medium comprising computer-program instructions executable by a processor to adaptively process video data, the computer-program instructions comprising instructions for: selecting a particular deinterlacing criterion based on whether portions of video data in proximity to the interlaced frame include a threshold amount of motion compensation information, the particular deinterlacing criterion being selected from a first and a second deinterlacing criterion; and deinterlacing the interlaced frame based on the particular deinterlacing criterion to generate at least one progressive frame, the at least one progressive frame is a first frame and a second frame, the first frame comprising scanlines from a first temporal instant, the second frame comprising scanlines from a second temporal instant, the first and second temporal instants being different from one another; resampling the first and second frames to form respective first and second resampled frames; and interleaving scanlines from the first and second resampled frames to generate a resampled interlaced frame.
 10. A computer-readable medium comprising computer-program instructions executable by a processor to adaptively process video data, the computer-program instructions comprising instructions for: selecting a particular deinterlacing criterion based on whether portions of video data in proximity to the interlaced frame include a threshold amount of motion compensation information, the particular deinterlacing criterion being selected from a first and a second deinterlacing criterion; deinterlacing the interlaced frame based on the particular deinterlacing criterion to generate at least one progressive frame; and selectively filtering a resampled frame with a particular filter of a plurality of filters, the resampled frame being based on the at least one progressive frame, the particular filter being selected based on whether the resampled frame is a progressive or an interlaced frame.
 11. A computing-device to adaptively process video data, the computing device comprising: a Processor coupled to a memory, the memory comprising computer-program instructions executable by the processor, the computer-program instructions comprising instructions for: adaptively resampling a frame of video data based on whether the frame is progressive or interlaced to generate a resampled frame; determining an output data format based on characteristics of a target display device, the output data format being a progressive or interlaced data format; if the corresponding resampled frame is not of the output data format, converting the resampled frame to the output data format; selecting a particular filter of a plurality of filters based on the output data format such that: if the output data format is interlaced and the resampled frame is interlaced, the particular filter is a smooth filter; if the output data format is progressive and an input frame corresponding to the resampled frame was interlaced, creating a resampled progressive frame from the resampled frame, the resampled progressive frame being the resampled frame, the particular filter being a sharp filter; if the output data format is interlaced and the resampled frame is progressive converting the resampled progressive frame to a resampled interlaced frame, the resampled interlaced frame being the resampled frame, and the particular filter being a smooth filter; if the output data format is progressive and the resampled frame is progressive, the particular filter being a sharp filter; filtering the resampled frame with the particular filter.
 12. A computing device to adaptively process video data, the computing device comprising: a processor coupled to a memory, the memory comprising computer-program instructions executable by the processor, the computer-program instructions comprising instructions for: adaptively resampling a interlaced frame of video data to generate a resampled frame by: deinterlacing the interlaced frame to generate a plurality of intermediate frames; resampling the intermediate frames; and interlacing scanlines of the intermediate frames to generate the resampled frame; determining an output data format based on characteristics of a target display device, the output data format being a progressive or interlaced data format; if the corresponding resampled frame is not of the output data format, converting the resampled frame to the output data format; selecting a particular filter of a plurality of filters based on the output data format; and filtering the resampled frame with the particular filter.
 13. A computing device as recited in claim 12, wherein deinterlacing the interlaced frame to generate a plurality of intermediate frames further comprises: selecting a particular deinterlacing criterion based on whether portions of video data in proximity to the interlaced frame include a threshold amount of motion compensation information, the particular deinterlacing criterion being selected from a first and a second deinterlacing criterion; and wherein the intermediate frames are progressive frames.
 14. A computer-readable medium as recited in claim 12, wherein the particular deinterlacing criterion is a 2-field deinterlacing criterion or a 3-field deinterlacing criterion.
 15. A computer-readable medium as recited in claim 12, wherein the particular deinterlacing criterion is independent of motion compensation calculations.
 16. A computer-readable medium as recited in claim 12, wherein selecting the particular deinterlacing criterion is performed at a scene change identified by substantially non-visually correlated components between at least two fields of three fields of the interlaced frame. 